home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1993 July / InfoMagic USENET CD-ROM July 1993.ISO / sources / misc / volume18 / notation / part01 next >
Encoding:
Internet Message Format  |  1991-04-13  |  50.4 KB

  1. From: hthomas@irisa.fr (Henry Thomas)
  2. Newsgroups: comp.sources.misc
  3. Subject: v18i012:  notation - Chess text converter, Part01/03
  4. Message-ID: <1991Apr12.032741.3547@sparky.IMD.Sterling.COM>
  5. Date: 12 Apr 91 03:27:41 GMT
  6. Approved: kent@sparky.imd.sterling.com
  7. X-Checksum-Snefru: da865abe 694af9be f3044e65 680ea8da
  8.  
  9. Submitted-by: Henry Thomas <hthomas@irisa.fr>
  10. Posting-number: Volume 18, Issue 12
  11. Archive-name: notation/part01
  12.  
  13. This program reads chess games, either full algebraic or shortened (ie
  14. Nf1-g3 or f1g3 or Ng3) and is able to ouptut the board after any move, in
  15. ascii form, postscript, or nroff or suitable for some TeX macros.
  16. Also, it can generate output for gnuan and the xboard program.
  17.  
  18. It is multi-lingual (european) for piece identification. The program
  19. understand french, english, german, spanish dutch and italian. Send me
  20. piece symbols for other languages(dannish, swedish, russian,
  21. portugese...), I will incorporate them happily.
  22.  
  23. This is a freeware program. You have the right to modify it, give it,
  24. provided you don't modify the copyright notice and my name still
  25. remains. 
  26.  
  27. This program is ok on Sun Sparc Station and Sun-3. It uses standard C,
  28. and I guess won't be too difficult to compile on a IBM-PC with MSC. 
  29. See the README for additional information.
  30.  
  31. If you're happy with this program, let me know. Also, I'm interested
  32. in any advice to a novice player of chess. I would appreciate if
  33. someone might give me advice about openings: overview, what they are
  34. for, which ones are not too risky for a novice etc... Thanks.
  35.  
  36. I hope the program is clear enough to be easily modified. Anyway, I
  37. would like to centralize modifications, in order to manage an
  38. up-to-date version. So send me the modifications, in forms of diff
  39. files, if possible, along with the version number of the program.
  40.  
  41. Henry
  42. ----------
  43. #! /bin/sh
  44. # This is a shell archive.  Remove anything before this line, then unpack
  45. # it by saving it into a file and typing "sh file".  To overwrite existing
  46. # files, type "sh file -c".  You can also feed this as standard input via
  47. # unshar, or by typing "sh <file", e.g..  If this archive is complete, you
  48. # will see the following message at the end:
  49. #        "End of archive 1 (of 3)."
  50. # Contents:  . BUGSREPORT CHANGES Footer.ps HELPFILE Header.ps
  51. #   Header.tex MANIFEST Makefile README TODO algebric.txt chesstype.h
  52. #   drivers.h keywords.txt lexer.c lexer.h notation.h notation.n
  53. #   print-ps shortened.txt
  54. # Wrapped by hthomas@yole on Thu Apr 11 14:28:52 1991
  55. PATH=/bin:/usr/bin:/usr/ucb ; export PATH
  56. if test -f 'BUGSREPORT' -a "${1}" != "-c" ; then 
  57.   echo shar: Will not clobber existing file \"'BUGSREPORT'\"
  58. else
  59. echo shar: Extracting \"'BUGSREPORT'\" \(604 characters\)
  60. sed "s/^X//" >'BUGSREPORT' <<'END_OF_FILE'
  61. X14/12/90
  62. Xsome functions implemented as macros
  63. Xcasting to void generalized when results not used
  64. Xadd a boldface to move number in tex driver
  65. X
  66. X13/12/90
  67. XAdd a \n output at begin of ascii driver
  68. X
  69. X13/12/90
  70. XPatches some errors in man page: 
  71. X- @configblack entry
  72. X- pawn dutch symbol
  73. X- an example (translation from dutch to spanish): -t instead of -o
  74. X
  75. X13/12/90
  76. XJacques Shuurman pointed that the duch symbol for Pawn should be "O".
  77. XCorrected
  78. X
  79. X12/12/90
  80. XPatched an extra instruction in assoc_driver(), that force force tex
  81. Xoutput to be in english
  82. X
  83. X12/12/90
  84. Xdebug version will be 1.7
  85. X
  86. X12/12/90
  87. XReleased version 1.6
  88. X
  89. END_OF_FILE
  90. if test 604 -ne `wc -c <'BUGSREPORT'`; then
  91.     echo shar: \"'BUGSREPORT'\" unpacked with wrong size!
  92. fi
  93. # end of 'BUGSREPORT'
  94. fi
  95. if test -f 'CHANGES' -a "${1}" != "-c" ; then 
  96.   echo shar: Will not clobber existing file \"'CHANGES'\"
  97. else
  98. echo shar: Extracting \"'CHANGES'\" \(393 characters\)
  99. sed "s/^X//" >'CHANGES' <<'END_OF_FILE'
  100. X** 11/05/91 NEW VERSION. Many many improvements: en-passant,
  101. Xpromotion. Split the source in many differents file. Programming style
  102. Ximproved etc...
  103. X
  104. X** 20/03/91 gnu driver has change. It is now named "xchess". The "gnu"
  105. Xname is now used for "gnuan" type files.
  106. X
  107. X** much improved latex output
  108. X
  109. X** improved internal move generation
  110. X
  111. X** added @special keyword, to directly include text in output
  112. END_OF_FILE
  113. if test 393 -ne `wc -c <'CHANGES'`; then
  114.     echo shar: \"'CHANGES'\" unpacked with wrong size!
  115. fi
  116. # end of 'CHANGES'
  117. fi
  118. if test -f 'Footer.ps' -a "${1}" != "-c" ; then 
  119.   echo shar: Will not clobber existing file \"'Footer.ps'\"
  120. else
  121. echo shar: Extracting \"'Footer.ps'\" \(196 characters\)
  122. sed "s/^X//" >'Footer.ps' <<'END_OF_FILE'
  123. X2 ENDPAGE
  124. X%%PageTrailer
  125. X%%PageFonts: Times-Roman Cheq 
  126. X%%PageBoundingBox: 20 20 576 756 
  127. X%%Trailer
  128. Xend %PROLOGUE
  129. X%%Pages: 1 
  130. X%%BoundingBox: 20 20 576 756 
  131. X%%DocumentFonts: Times-Roman Cheq 
  132. X%%EOF
  133. END_OF_FILE
  134. if test 196 -ne `wc -c <'Footer.ps'`; then
  135.     echo shar: \"'Footer.ps'\" unpacked with wrong size!
  136. fi
  137. # end of 'Footer.ps'
  138. fi
  139. if test -f 'HELPFILE' -a "${1}" != "-c" ; then 
  140.   echo shar: Will not clobber existing file \"'HELPFILE'\"
  141. else
  142. echo shar: Extracting \"'HELPFILE'\" \(958 characters\)
  143. sed "s/^X//" >'HELPFILE' <<'END_OF_FILE'
  144. XCommand line options:
  145. Xnotation [options]
  146. X    where options are
  147. X    -a        : algebraic move notation output
  148. X    -s        : shortened move notation output
  149. X    -f <language>    : specify the chess symbol input language .The
  150. X            language  can be any of:
  151. X        french
  152. X        english
  153. X        italian
  154. X        spanish
  155. X        german
  156. X        dutch
  157. X    -t <language>    : specify the chess symbol output language.
  158. X            Same options as input language
  159. X    <inputfile>    : specify the input file. If none, keyboard is assumed
  160. X    -o <outputfile>    : specify the output file. If none, screen is assumed
  161. X    -c <number>[,<number]    : specify the number of the moves to display
  162. X            the board. if none, board is diplayed at end of file
  163. X    -e <number>     : display the board at the move number and then stops
  164. X    -b        : display only the board, not the moves
  165. X    -d <drivername>    : specify the output driver. It can be any of
  166. X            the following:
  167. X        ascii
  168. X        postscript
  169. X        tex     (latex)
  170. X        roff
  171. X        xchess     (xchess save format)
  172. X        gnu    (gnuan input format)
  173. X    -h        : show this help
  174. END_OF_FILE
  175. if test 958 -ne `wc -c <'HELPFILE'`; then
  176.     echo shar: \"'HELPFILE'\" unpacked with wrong size!
  177. fi
  178. # end of 'HELPFILE'
  179. fi
  180. if test -f 'Header.ps' -a "${1}" != "-c" ; then 
  181.   echo shar: Will not clobber existing file \"'Header.ps'\"
  182. else
  183. echo shar: Extracting \"'Header.ps'\" \(2180 characters\)
  184. sed "s/^X//" >'Header.ps' <<'END_OF_FILE'
  185. X%!PS-Adobe-2.1
  186. X%%% HOW TO USE:  from Unix, "cat Cheq Example | lpr -Pprintername "
  187. X%%Title: Cheq.cheqtxtx
  188. X%%Creator: Glenn Reid and still.ps (V 1.0d release 10 edit 08)
  189. X%%BoundingBox: (atend)
  190. X%%Pages: (atend)
  191. X%%DocumentProcSets: Adobe_distill 0.95
  192. X%%EndComments
  193. X%%BeginProcSet: Adobe_distill 0.95
  194. X/PROLOGUE 30 40 add dict def
  195. X % 30 procedure entries + room for 40 cached font dictionaries
  196. X PROLOGUE begin
  197. X /clip { } def    % causes problems. remove if "clip" is needed
  198. X /bdef { bind def } bind def    /ldef { load def } bdef
  199. X /T { moveto show } bdef    /A { moveto ashow } bdef
  200. X /W { moveto widthshow } bdef    /AW { moveto awidthshow } bdef
  201. X /f /fill ldef            /R { { rlineto } repeat } bdef
  202. X /r /rlineto ldef        /L { { lineto } repeat } bdef
  203. X /m /moveto ldef        /l { moveto lineto stroke } bdef
  204. X /x { 0 rlineto } bdef        /y { 0 exch rlineto } bdef
  205. X /c /curveto ldef        /cp /closepath ldef
  206. X /s /stroke ldef        /w /setlinewidth ldef
  207. X /g /setgray ldef        /j /setlinejoin ldef
  208. X /d /setdash ldef        /F /setfont ldef
  209. X /C /setcmykcolor where { /setcmykcolor get }{ %ifelse
  210. X   { %def
  211. X     1 sub 3 { 3 index add neg dup 0 lt { pop 0 } if 3 1 roll } repeat
  212. X     setrgbcolor
  213. X   } bind
  214. X } ifelse def
  215. X /MF { findfont exch makefont setfont } bdef
  216. X /DF { findfont exch scalefont setfont currentfont def } bdef
  217. X /BEGINPAGE { pop /pagesave save def } bdef
  218. X /ENDPAGE { pop pagesave restore showpage } def
  219. X /REMAP { %def
  220. X   FontDirectory 2 index known { pop pop pop } { %ifelse
  221. X     findfont dup length dict begin
  222. X       { 1 index /FID ne {def}{pop pop} ifelse } forall
  223. X       exch dup length 0 gt { /Encoding exch def }{ pop } ifelse
  224. X     currentdict end definefont pop
  225. X   } ifelse
  226. X } bdef
  227. X /RECODE { %def
  228. X    3 -1 roll 1 index findfont /Encoding get 256 array copy exch
  229. X    0 exch { %forall
  230. X     dup type/nametype eq
  231. X       { 3 {2 index} repeat put pop 1 add }{ exch pop }ifelse
  232. X    } forall pop 3 1 roll REMAP
  233. X } bdef
  234. X end %PROLOGUE
  235. X%%EndProcSet: Adobe_distill 0.95
  236. X%%EndProlog
  237. X%%BeginSetup
  238. XPROLOGUE begin
  239. X
  240. X%%EndSetup
  241. X%%Page: 1 1
  242. X%%PageFonts: (atend)
  243. X%%PageBoundingBox: (atend)
  244. X1 BEGINPAGE
  245. X1 1 1 0 C
  246. X/F1 12 /Times-Roman DF
  247. X(output of program notation, using font Cheq \(gift of Adobe Systems\))
  248. X72 756 T
  249. X/F2 30 /Cheq DF
  250. END_OF_FILE
  251. if test 2180 -ne `wc -c <'Header.ps'`; then
  252.     echo shar: \"'Header.ps'\" unpacked with wrong size!
  253. fi
  254. # end of 'Header.ps'
  255. fi
  256. if test -f 'Header.tex' -a "${1}" != "-c" ; then 
  257.   echo shar: Will not clobber existing file \"'Header.tex'\"
  258. else
  259. echo shar: Extracting \"'Header.tex'\" \(1477 characters\)
  260. sed "s/^X//" >'Header.tex' <<'END_OF_FILE'
  261. X% Header for chess printing
  262. X\documentstyle[twocolumn]{article}
  263. X\font\chess=chess20
  264. X\font\figchess=chessfig10
  265. X%
  266. X%figures
  267. X\def\FigK{{\figchess K}}
  268. X\def\FigQ{{\figchess Q}}
  269. X\def\FigR{{\figchess R}}
  270. X\def\FigB{{\figchess B}}
  271. X\def\FigN{{\figchess N}}
  272. X\def\FigP{}
  273. X\def\FigVoid{}
  274. X\def\FigDash{--}
  275. X\def\FigCapt{$\times$}
  276. X%\def\FigDots{~$\ldots$,}
  277. X\def\FigDots{$\ldots$}
  278. X\def\FigDot{\char46}
  279. X%
  280. X% white pieces on white
  281. X\def\WKW{{\chess K}}
  282. X\def\WQW{{\chess Q}}
  283. X\def\WRW{{\chess R}}
  284. X\def\WBW{{\chess B}}
  285. X\def\WNW{{\chess N}}
  286. X\def\WPW{{\chess P}}
  287. X% white pieces on black
  288. X\def\WKB{{\chess J}}
  289. X\def\WQB{{\chess L}}
  290. X\def\WRB{{\chess S}}
  291. X\def\WBB{{\chess A}}
  292. X\def\WNB{{\chess M}}
  293. X\def\WPB{{\chess O}}
  294. X% black pieces on white
  295. X\def\BKW{{\chess k}}
  296. X\def\BQW{{\chess q}}
  297. X\def\BRW{{\chess r}}
  298. X\def\BBW{{\chess b}}
  299. X\def\BNW{{\chess n}}
  300. X\def\BPW{{\chess p}}
  301. X% black pieces on black
  302. X\def\BKB{{\chess j}}
  303. X\def\BQB{{\chess l}}
  304. X\def\BRB{{\chess s}}
  305. X\def\BBB{{\chess a}}
  306. X\def\BNB{{\chess m}}
  307. X\def\BPB{{\chess o}}
  308. X% white empty 
  309. X\def\WWW{{\chess 0}}
  310. X% black empty */
  311. X\def\DDD{{\chess Z}}
  312. X%
  313. X\def\vvrule{\vrule width1pt} \def\hhrule{\hrule height1pt}
  314. X%
  315. X\newcommand{\movenumber}[1]{\noindent\makebox[1.5cm][r]{#1}}
  316. X\newcommand{\whitemove}[1]{\makebox[2cm][r]{#1}}
  317. X\newcommand{\blackmove}[1]{\makebox[2cm][r]{#1}~\\}
  318. X
  319. X%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  320. X\begin{document}
  321. X%\title{Notation Output}
  322. X%\author{notation program (C) Henry Thomas 1990}
  323. X%\date{\today}
  324. X%\maketitle
  325. END_OF_FILE
  326. if test 1477 -ne `wc -c <'Header.tex'`; then
  327.     echo shar: \"'Header.tex'\" unpacked with wrong size!
  328. fi
  329. # end of 'Header.tex'
  330. fi
  331. if test -f 'MANIFEST' -a "${1}" != "-c" ; then 
  332.   echo shar: Will not clobber existing file \"'MANIFEST'\"
  333. else
  334. echo shar: Extracting \"'MANIFEST'\" \(0 characters\)
  335. sed "s/^X//" >'MANIFEST' <<'END_OF_FILE'
  336. END_OF_FILE
  337. if test 0 -ne `wc -c <'MANIFEST'`; then
  338.     echo shar: \"'MANIFEST'\" unpacked with wrong size!
  339. fi
  340. # end of 'MANIFEST'
  341. fi
  342. if test -f 'Makefile' -a "${1}" != "-c" ; then 
  343.   echo shar: Will not clobber existing file \"'Makefile'\"
  344. else
  345. echo shar: Extracting \"'Makefile'\" \(2153 characters\)
  346. sed "s/^X//" >'Makefile' <<'END_OF_FILE'
  347. X# Makefile for notation program
  348. X# (C) Henry Thomas 1990
  349. X
  350. XFILES      = notation.c drivers.c lexer.c
  351. XHEADERS       = notation.h drivers.h lexer.h chesstype.h
  352. X#LIBDIR     = ./lib
  353. XLIBDIR     = .
  354. XBINDIR=$(HOME)/local/bin.$(HOSTTYPE)
  355. X
  356. XOBJECTS    = notation.o drivers.o lexer.o
  357. X
  358. XOTHERFILES = Makefile HELPFILE \
  359. X    keywords.txt algebric.txt shortened.txt \
  360. X    notation.doc notation.n \
  361. X    README TODO BUGSREPORT COPYING CHANGES \
  362. X    print-ps \
  363. X    Header.ps Footer.ps Header.tex \
  364. X    MANIFEST
  365. X
  366. X
  367. XSAVEFILES  = $(FILES) $(HEADERS) $(OTHERFILES)
  368. X
  369. XKITNAME       = "Notation"
  370. X
  371. X############################################################
  372. X# you might want to define the lib path : 
  373. X#    do not forget the trailing /
  374. X# ( the library is the place where the HELPFILE, Heading, fonts etc are)
  375. X# also you can have default language for input/ouput
  376. X# define DEFAULT_INPUT_LANGUAGE and DEFAULT_OUPUT_LANGUAGE
  377. X# value can be:
  378. X#    FRENCH, ENGLISH, GERMAN, ITALIAN, SPANISH, DUTCH
  379. X# ANSI C/ TURBO C (MSDOS)
  380. X# to compile with TURBO C or ANSI C, define TURBOC
  381. XCFLAGS     = -DLIB_DIR=\"$(HOME)/echecs/notation_dir/\" \
  382. X-DDEFAULT_INPUT_LANGUAGE=FRENCH -DDEFAULT_OUTPUT_LANGUAGE=FRENCH 
  383. XLDFLAGS    =
  384. X
  385. X#CC= gcc -pedantic 
  386. X
  387. X############################################################
  388. X
  389. X.KEEPSTATE:
  390. X
  391. Xall: notation notation.doc
  392. X
  393. Xnotation: $(OBJECTS)
  394. X    $(CC) $(CFLAGS) -o notation  $(OBJECTS) 
  395. X
  396. Xkit     : $(SAVEFILES)
  397. X    makekit -n$(KITNAME) $(LIBDIR) $(SAVEFILES) > MANIFEST
  398. X
  399. Xshar     : $(SAVEFILES)
  400. X    shar -o$(KITNAME).shar $(LIBDIR) $(SAVEFILES) 
  401. X
  402. Xzoo    : $(SAVEFILES)
  403. X    chmod +w $(KITNAME).zoo
  404. X    zoo -freshen $(KITNAME).zoo $(SAVEFILES)
  405. X    rm -f $(KITNAME).bak
  406. X    chmod -w $(KITNAME).zoo
  407. X
  408. Xsauve   :
  409. X    make zoo
  410. X    chmod +w $(KITNAME).zoo
  411. X    cp $(KITNAME).zoo $(HOME)/local/sauve
  412. X    chmod -w $(KITNAME).zoo
  413. X
  414. Xinstall:
  415. X    make notation
  416. X    strip notation
  417. X    chmod +x print-ps
  418. X    make notation.doc 
  419. X
  420. Xhthomas:
  421. X    make install
  422. X    mv notation $(BINDIR)
  423. X
  424. Xclean:
  425. X    rm -f notation $(OBJECTS)
  426. X
  427. Xnotation.doc: notation.n
  428. X    nroff -man notation.n > notation.doc
  429. X
  430. X
  431. X# DO NOT DELETE THIS LINE -- make depend depends on it.
  432. X
  433. Xdrivers.o: chesstype.h notation.h drivers.h
  434. Xlexer.o: chesstype.h notation.h lexer.h
  435. Xnotation.o: chesstype.h drivers.h notation.h lexer.h
  436. END_OF_FILE
  437. if test 2153 -ne `wc -c <'Makefile'`; then
  438.     echo shar: \"'Makefile'\" unpacked with wrong size!
  439. fi
  440. # end of 'Makefile'
  441. fi
  442. if test -f 'README' -a "${1}" != "-c" ; then 
  443.   echo shar: Will not clobber existing file \"'README'\"
  444. else
  445. echo shar: Extracting \"'README'\" \(3653 characters\)
  446. sed "s/^X//" >'README' <<'END_OF_FILE'
  447. X** DESCRIPTION
  448. X
  449. XThis program read chess games, either full algebraic or shortened (ie
  450. XNf1-g3 or f1g3 or Ng3) and is able to ouptut the board after any move, in
  451. Xascii form, postscript, or nroff or suitable for some TeX macros.
  452. XAlso, it can genearte output for gnuan and the xboard program.
  453. X
  454. XIt is multi-lingual (european) for piece identification. The program
  455. Xunderstand french, english, german, spanish dutch and italian. Send me
  456. Xpiece symbols for other languages(dannish, swedish, russian,
  457. Xportugese...), it will incorporate them happily.
  458. X
  459. XThis is a freeware program. You have the right to modify it, give it,
  460. Xprovided you don't modify the copyright notice and my name still
  461. Xremains. 
  462. X
  463. XThe distribution has 3 shar-type files.
  464. X
  465. X** QUICK USE
  466. X
  467. XAnyway, you want to try quickly the program, 
  468. Xissue the command "make" in this directory, and then 
  469. Xtype "notation algebric.txt" to test the programm on Kasparov/Karpov
  470. Xgame 13 (Lyon, November 1990).
  471. X
  472. XRead and modify the makefile for customizing notation to your national
  473. Xlanguage and library path.
  474. X
  475. XIf you want a complete manual, read notation.doc.
  476. X
  477. XTo print a postscript file, use "print-ps file"
  478. X
  479. X** SOURCES
  480. XThey are posted to "comp.sources.misc". You can also get them by mail,
  481. Xfrom "hthomas@irisa.fr". I put them on anonymous ftp on
  482. Xwuarchive.wustl.edu, (user:anonymous, password:<your address>). The
  483. Xpath is "pub/Notation.shar".
  484. X
  485. X** IMPORTANT
  486. XIf you want to use PostScript or LaTeX, you need two packages not
  487. Xprovided here. However, here is a way to get them:
  488. X
  489. X**** Postscript: 
  490. X  You need the font "Cheq", freely distributed by Adobe.  Send a mail
  491. Xto "ps-file-server@adobe.com" with the body "send Programs
  492. Xchessfont.ps". For use with "notation", rename the file "Cheq".
  493. X
  494. X------------------------------------------------------------------
  495. Xchessfont.ps              58548 Jun 22 1989
  496. X    This is the Adobe chess font "Cheq", created by John Renner. It 
  497. X    is an ASCII downloadable version of the font that is not in any 
  498. X    particular font format for a specific platform. See also
  499. X    "chessfontUNIX.shar" and "chessfontMAC.shar" for the font bundled 
  500. X    with other useful files like screen fonts and AFM files. If you 
  501. X    just want the font, it is available in this file separately for 
  502. X    convenience.
  503. X------------------------------------------------------------------
  504. X
  505. X**** LaTeX: 
  506. X  You need the chess fonts designed by Piet Tutalaers
  507. X"rcpt@urc.tue.nl". The complete distribution is available on
  508. Xsol.cs.ruu.nl (131.211.80.5) with path TEX/chess.tar.Z
  509. X
  510. X------------------------------------------------------------------
  511. X-rw-r--r--  1 piet     staff        2984 Dec  3 10:11 chess.README
  512. X-rwxr--r--  1 piet     staff      129679 Dec  3 15:57 chess.tar.Z
  513. X------------------------------------------------------------------
  514. X
  515. X** DOCUMENTATION
  516. XSee the file notation.doc for any info
  517. X
  518. X** COPYRIGHT
  519. X
  520. XThis is a freeware program. You have the right to modify it, give it,
  521. Xprovided you don't modify the copyright notice and my name still
  522. Xremains. 
  523. X
  524. XFor the others packages (Cheq and chess font, refers to the original
  525. Xcopyright notice). 
  526. X
  527. X** USER FEEDBACK
  528. X
  529. XIf you're happy with this program, let me know. Also, I'm interested
  530. Xin any advice to a novice player of chess. I would appreciate if
  531. Xsomeone might give me advices obout openings: overview, what they are
  532. Xfor, which ones are not too risky for a novice etc... Thanks.
  533. X
  534. X
  535. X** MODIFICATIONS
  536. X
  537. XI hope the program to be clear enough to be easily modified. Anyway, I
  538. Xwould like to centralize modification, in order to manage an
  539. Xup-to-date version. So send me the modification, in forms of diff
  540. Xfiles, if possible, along with the version number of the program.
  541. X
  542. END_OF_FILE
  543. if test 3653 -ne `wc -c <'README'`; then
  544.     echo shar: \"'README'\" unpacked with wrong size!
  545. fi
  546. # end of 'README'
  547. fi
  548. if test -f 'TODO' -a "${1}" != "-c" ; then 
  549.   echo shar: Will not clobber existing file \"'TODO'\"
  550. else
  551. echo shar: Extracting \"'TODO'\" \(336 characters\)
  552. sed "s/^X//" >'TODO' <<'END_OF_FILE'
  553. XA lot of things remains to do:
  554. X
  555. Xinput/output
  556. X- handle comments
  557. X- handle variations
  558. X- allows special comments to specify title
  559. X- allows command-line options to specify title
  560. X- handle half-move for displaying output
  561. X
  562. X
  563. Xfrom a programming point of vue:
  564. X- improve the lexer
  565. X- handle comments to have then in the output file
  566. X- detect check
  567. X
  568. X
  569. END_OF_FILE
  570. if test 336 -ne `wc -c <'TODO'`; then
  571.     echo shar: \"'TODO'\" unpacked with wrong size!
  572. fi
  573. # end of 'TODO'
  574. fi
  575. if test -f 'algebric.txt' -a "${1}" != "-c" ; then 
  576.   echo shar: Will not clobber existing file \"'algebric.txt'\"
  577. else
  578. echo shar: Extracting \"'algebric.txt'\" \(958 characters\)
  579. sed "s/^X//" >'algebric.txt' <<'END_OF_FILE'
  580. X
  581. X[WORLD CHESS CHAMPIONSHIP]
  582. X[GAME 13 Adjourned]
  583. X[November 24, 1990]
  584. X
  585. X[   KARPOV      KASPAROV]
  586. X 1. d2-d4      g8-f6
  587. X 2. c2-c4      g7-g6
  588. X 3. b1-c3      d7-d5
  589. X 4. c4Xd5      f6Xd5
  590. X 5. e2-e4      d5Xc3
  591. X 6. b2Xc3      f8-g7
  592. X 7. c1-e3      c7-c5
  593. X 8. d1-d2       O-O
  594. X 9. a1-c1      d8-a5
  595. X10. g1-f3      e7-e6
  596. X11. d4-d5      e6Xd5
  597. X12. e4Xd5      f8-e8
  598. X13. f1-e2      c8-f5
  599. X14.  O-O       b8-d7
  600. X15. h2-h3      d7-b6
  601. X16. g2-g4      f5-d7
  602. X17. c3-c4      a5Xd2
  603. X18. f3Xd2      b6-a4
  604. X19. e2-f3      a4-c3
  605. X20. c1Xc3      g7Xc3
  606. X21. d2-e4      e8Xe4
  607. X22. f3Xe4      a8-e8
  608. X23. e4-d3      b7-b6
  609. X24. g1-g2      f7-f5
  610. X25. g4Xf5      d7Xf5
  611. X26. d3Xf5      g6Xf5
  612. X27. f1-d1      g8-f7
  613. X28. d1-d3      c3-f6
  614. X29. d3-a3      a7-a5
  615. X30. a3-b3      f6-d8
  616. X31. b3-c3      d8-c7
  617. X32. a2-a4      f7-f6
  618. X33. g2-f1      f5-f4
  619. X34. e3-c1      f6-f5
  620. X35. c3-c2      e8-g8
  621. X36. c2-e2      c7-e5
  622. X37. c1-b2      e5-d4
  623. X38. b2Xd4      c5Xd4
  624. X39. e2-e7      d4-d3
  625. X40. f1-e1      g8-c8
  626. X41. e1-d2      c8Xc4
  627. X
  628. X
  629. X
  630. END_OF_FILE
  631. if test 958 -ne `wc -c <'algebric.txt'`; then
  632.     echo shar: \"'algebric.txt'\" unpacked with wrong size!
  633. fi
  634. # end of 'algebric.txt'
  635. fi
  636. if test -f 'chesstype.h' -a "${1}" != "-c" ; then 
  637.   echo shar: Will not clobber existing file \"'chesstype.h'\"
  638. else
  639. echo shar: Extracting \"'chesstype.h'\" \(2385 characters\)
  640. sed "s/^X//" >'chesstype.h' <<'END_OF_FILE'
  641. X/* notation program */
  642. X/* types definition */
  643. X#ifndef _HEADERS_TYPES
  644. X#define _HEADERS_TYPES
  645. X
  646. X#define FALSE 0
  647. X#define TRUE  1
  648. X
  649. X#ifndef NULL
  650. X#define NULL    ((char *) 0)
  651. X#endif
  652. X
  653. X#define MAX(a,b)  ((a)>(b)?(a):(b))
  654. X#define MIN(a,b)  ((a)<(b)?(a):(b))
  655. X#define ABS(a)      ((a)>=0?(a):(-(a)))
  656. X#define SIGN(a)   ((a)>=0?(1):-1)
  657. X
  658. X#define DUMMYCHAR '$'
  659. X#define MAXTOKLEN 1024
  660. X
  661. X
  662. X/* max number of move for displaying board */
  663. X#define NB_MOVE_TO_DISP 128
  664. X
  665. X/* debugging help */
  666. X#ifdef DEBUG
  667. X#define MESSAGE(A) (void) fprintf A
  668. X#define ACTION(A)  A
  669. X#else
  670. X#define MESSAGE(A)
  671. X#define ACTION(A)
  672. X#endif
  673. X
  674. X/* output move format */
  675. X
  676. X#define ALGEBRAIC 0
  677. X#define SHORTENED 1
  678. X
  679. X/* -------------------------------------------- */
  680. X/*              chess data structures           */
  681. X/* -------------------------------------------- */
  682. X
  683. X#define NUMPIECES 7
  684. X
  685. X#define KING   1
  686. X#define QUEEN  2
  687. X#define ROOK   3
  688. X#define BISHOP 4
  689. X#define KNIGHT 5
  690. X#define PAWN   6
  691. X
  692. X#define VOID  0
  693. X#define WHITE 1
  694. X#define BLACK 2
  695. X
  696. X/* board and move representation */
  697. X/* board size */
  698. X#define SIZE 10 
  699. X
  700. X/* ---- structure to represent the game ---- */
  701. Xtypedef struct {
  702. X
  703. X  /* board definition */
  704. X  int board[SIZE][SIZE];
  705. X  int color[SIZE][SIZE];
  706. X
  707. X} game ;
  708. X/* ---- end of structure ---- */
  709. X
  710. X#define GULL (game *) 0
  711. X
  712. X/* french(roque) == english(castling) */
  713. X
  714. X#define MOVE        1      /* un mouvement        */
  715. X#define PRISE        2          /* une prise           */
  716. X#define GRANDROQUE    3     /* grand roque         */
  717. X#define PETITROQUE    4     /* petit roque         */
  718. X#define EN_PASSANT    5    /* prise en passant    */
  719. X#define PROMOTION      6    /* promotion           */
  720. X#define PROM_ET_PRISE    7    /* promotion + capture */
  721. X
  722. X#define SHORT_COMMENT_LEN 4
  723. X
  724. X/* structure used to describe the current move */
  725. Xtypedef struct {
  726. X  int move ;        /* number of the move */
  727. X  int whiteturn ;     /* boolean to tell white's turn */
  728. X
  729. X  int type;        /* type of move: MOVE, PRISE, etc..   */
  730. X  int piece;        /* type of the piece */
  731. X
  732. X  int fromcol, fromlig;    /* from position */
  733. X  int tocol, tolig ;    /* destination   */
  734. X
  735. X  int prise;        /* captured piece */
  736. X  int promotion;        /* name of the pice the pawn is promoted to */
  737. X
  738. X  int is_check[3] ;    /* = { 0, FALSE, FALSE }*/
  739. X
  740. X  char comment[SHORT_COMMENT_LEN];    /* short text comment */
  741. X  char * text ;         /* long text comment */
  742. X}  depl ;
  743. X
  744. X#define MULL (depl *) 0
  745. X
  746. X#define CURCOLOR(M) (((M)->whiteturn)?(WHITE):(BLACK))
  747. X
  748. X/* end headers */
  749. X#endif
  750. END_OF_FILE
  751. if test 2385 -ne `wc -c <'chesstype.h'`; then
  752.     echo shar: \"'chesstype.h'\" unpacked with wrong size!
  753. fi
  754. # end of 'chesstype.h'
  755. fi
  756. if test -f 'drivers.h' -a "${1}" != "-c" ; then 
  757.   echo shar: Will not clobber existing file \"'drivers.h'\"
  758. else
  759. echo shar: Extracting \"'drivers.h'\" \(1675 characters\)
  760. sed "s/^X//" >'drivers.h' <<'END_OF_FILE'
  761. X/* notation program */
  762. X/* headers for output drivers */
  763. X#ifndef _HEADERS_DRIVERS
  764. X#define HEADERS_DRIVERS
  765. X
  766. X
  767. X#define D_ASCII  0
  768. X#define D_POST   1
  769. X#define D_TEX    2
  770. X#define D_ROFF   3
  771. X#define D_XCHESS 4
  772. X#define D_GNU    5
  773. X
  774. X#define NB_DRIVER 6
  775. X
  776. X
  777. X
  778. X#define PS_HEADER  "Header.ps"
  779. X#define PS_FOOTER  "Footer.ps"
  780. X#define TEX_HEADER "Header.tex"
  781. X
  782. X
  783. X/* output buffers */
  784. X#define TAMPON 256
  785. X
  786. Xtypedef struct {
  787. X
  788. X  /* type of driver */
  789. X  int type ;
  790. X
  791. X  /* output_file */
  792. X  FILE *outfile ;
  793. X  /* these  booleans control the output format */
  794. X  int print_move    ;  /* move numbering */
  795. X  int print_piece   ;  /* print piece name */
  796. X  int print_pawn    ; /* print the PAWN name */
  797. X  int roque_alg     ; /*  roque in algebraic form Ke1g1 or O-O */
  798. X  int print_liaison ; /* print the - or x in move output */
  799. X  int only_board ;
  800. X
  801. X  int variation_level ;
  802. X
  803. X  /* boolean to print the coordinates in ascii output of board */
  804. X  int coordinates   ;
  805. X  int output_move_format ;
  806. X
  807. X  char *out_table;    /* translation table */
  808. X
  809. X  /* procedures */
  810. X  void (*out_init)() ;
  811. X  void (*out_move)() ;
  812. X  void (*out_board)() ;
  813. X  void (*out_end)() ;
  814. X
  815. X  /* temp vars  used by move buffering */
  816. X
  817. X  int iswhiteturn ; /*= FALSE */
  818. X  int interrupt ; /*= FALSE */
  819. X
  820. X  char move_buffer[TAMPON]  /*= ""*/ ;
  821. X  char white_buffer[TAMPON] /*= ""*/ ;
  822. X  char black_buffer[TAMPON] /*= ""*/ ;
  823. X
  824. X
  825. X} format ;
  826. X
  827. X
  828. X/* fonctions ----------------- */
  829. X
  830. Xextern void output_init(/*format *dr*/);
  831. Xextern void output_move(/*format *dr, depl *d*/);
  832. Xextern void output_board(/*format *dr, game *g*/);
  833. Xextern void output_end(/*format *dr*/);
  834. X
  835. Xextern format *new_driver(/*void*/);
  836. Xextern void init_driver(/*format *dr, int driver, int olboard*/);
  837. X
  838. X#endif
  839. END_OF_FILE
  840. if test 1675 -ne `wc -c <'drivers.h'`; then
  841.     echo shar: \"'drivers.h'\" unpacked with wrong size!
  842. fi
  843. # end of 'drivers.h'
  844. fi
  845. if test -f 'keywords.txt' -a "${1}" != "-c" ; then 
  846.   echo shar: Will not clobber existing file \"'keywords.txt'\"
  847. else
  848. echo shar: Extracting \"'keywords.txt'\" \(237 characters\)
  849. sed "s/^X//" >'keywords.txt' <<'END_OF_FILE'
  850. X[Example of keywords use]
  851. X[absolutely non-sense game]
  852. Xe2-e4 c7c6
  853. X@showboard
  854. X@clearboard
  855. X@showboard
  856. X@configwhite
  857. X d4    Nf6
  858. X Nc3   @showboard d5
  859. X@configblack
  860. X Kg8
  861. X@startplay
  862. X@showboard
  863. X@blacksmove
  864. XRg8-g7 @showboard d5-d6
  865. XRg7-f6
  866. X
  867. X@null
  868. X
  869. X
  870. X
  871. END_OF_FILE
  872. if test 237 -ne `wc -c <'keywords.txt'`; then
  873.     echo shar: \"'keywords.txt'\" unpacked with wrong size!
  874. fi
  875. # end of 'keywords.txt'
  876. fi
  877. if test -f 'lexer.c' -a "${1}" != "-c" ; then 
  878.   echo shar: Will not clobber existing file \"'lexer.c'\"
  879. else
  880. echo shar: Extracting \"'lexer.c'\" \(2155 characters\)
  881. sed "s/^X//" >'lexer.c' <<'END_OF_FILE'
  882. X#include <stdio.h>
  883. X
  884. X#include "chesstype.h"
  885. X#include "notation.h"
  886. X#include "lexer.h"
  887. X
  888. X/*token */
  889. Xstatic char curtok[MAXTOKLEN];
  890. X
  891. Xextern FILE * infile ;
  892. X
  893. X/* commentary level 
  894. X act as a boolean too */
  895. Xstatic int comment = FALSE;
  896. X
  897. X
  898. Xstatic char nextchar()
  899. X{
  900. X  if (!feof(infile))
  901. X    return(getc(infile));
  902. X  else
  903. X    return('\0');
  904. X}
  905. X
  906. X
  907. X
  908. X/* this function returns the next token:
  909. X   Definition of a token:
  910. X   a number [0-9]*. ie 1. ,  35. 
  911. X   a string terminated by a blank or rc or "." or tab
  912. X   commentary enclosed in 90 or [] are skipped
  913. X   Each move must not have a blank inside ie exc6 legal,
  914. X   but not e x c6
  915. X   */
  916. Xint nexttoken()
  917. X{
  918. X  int i =0;
  919. X  char c;
  920. X  
  921. X  /*(void) fprintf(stdout, "nexttoken\n");*/
  922. X  curtok[0]= '\0' ;
  923. X  c = nextchar();
  924. X  while ((c == ' ') || (c == '\n') || (c == '\t') || (c== '.') || 
  925. X     ( c== '[') || (c =='(' ) ||  comment ) {
  926. X    /*(void) fprintf(stdout, "=%c",c);*/
  927. X    switch (c) {
  928. X    case '[':
  929. X    case '(':
  930. X      comment++;
  931. X      break;
  932. X    case ']':
  933. X    case ')':
  934. X      comment--;
  935. X      break;
  936. X    default:
  937. X      break;
  938. X    }
  939. X    c = nextchar();
  940. X  }
  941. X
  942. X  if (c == '\0') return (FALSE);
  943. X
  944. X  while ( c != ' ' && c != '\n' &&  c != '\t' &&
  945. X     c != '.'  && c != '\0' && c != '[' && c!= '(' &&
  946. X     i < MAXTOKLEN ) {
  947. X    curtok[i++] = c ;
  948. X    c = nextchar();
  949. X  }
  950. X  if ( c== '.' )
  951. X    curtok[i++] = c ;
  952. X  
  953. X  curtok[i] = '\0' ;
  954. X  if ( c == '[' || c == '(' )
  955. X    comment++;
  956. X
  957. X  if (c == '\0') return (FALSE);
  958. X    
  959. X  /*(void) fprintf(stdout,"---%s---\n",curtok);*/
  960. X  return(TRUE);
  961. X}
  962. X
  963. X
  964. X/* this function parse the current token */
  965. Xint parsetoken()
  966. X{
  967. X  int i;
  968. X  register int c;
  969. X
  970. X
  971. X  /* look for keyword */
  972. X  if (curtok[0] == '@') /* keyword case */ 
  973. X    return(parse_keyword(curtok));
  974. X  
  975. X  /* look for roque */
  976. X  if (parse_roque(curtok))
  977. X    return(TRUE);
  978. X
  979. X  /* is it a move numbering ? */
  980. X  if ((curtok[0] >= '0') && (curtok[0] <= '9' )) {
  981. X    return(parse_number(curtok) );
  982. X  }
  983. X
  984. X  /* last option: it is a move 
  985. X     Syntax of a move:
  986. X     [] denote a range]
  987. X     () denote a 0/1 (absence/presence)
  988. X     
  989. X     ((Piece Name)[a-h]([1-8])[x-])(PieceName)[a-h][1-8]
  990. X
  991. X     We use an automata here.
  992. X     */
  993. X  parse_move(curtok);
  994. X
  995. X  
  996. X  return(TRUE);
  997. X}
  998. X
  999. END_OF_FILE
  1000. if test 2155 -ne `wc -c <'lexer.c'`; then
  1001.     echo shar: \"'lexer.c'\" unpacked with wrong size!
  1002. fi
  1003. # end of 'lexer.c'
  1004. fi
  1005. if test -f 'lexer.h' -a "${1}" != "-c" ; then 
  1006.   echo shar: Will not clobber existing file \"'lexer.h'\"
  1007. else
  1008. echo shar: Extracting \"'lexer.h'\" \(119 characters\)
  1009. sed "s/^X//" >'lexer.h' <<'END_OF_FILE'
  1010. X
  1011. X#ifndef _HEADER_LEXER
  1012. X#define _HEADER_LEXER
  1013. X
  1014. Xextern int nexttoken(/*void*/);
  1015. Xextern int parsetoken(/*void*/);
  1016. X
  1017. X#endif
  1018. END_OF_FILE
  1019. if test 119 -ne `wc -c <'lexer.h'`; then
  1020.     echo shar: \"'lexer.h'\" unpacked with wrong size!
  1021. fi
  1022. # end of 'lexer.h'
  1023. fi
  1024. if test -f 'notation.h' -a "${1}" != "-c" ; then 
  1025.   echo shar: Will not clobber existing file \"'notation.h'\"
  1026. else
  1027. echo shar: Extracting \"'notation.h'\" \(3383 characters\)
  1028. sed "s/^X//" >'notation.h' <<'END_OF_FILE'
  1029. X/* notation program */
  1030. X#ifndef _NOTATION_HEADERS
  1031. X#define _NOTATION_HEADERS
  1032. X
  1033. X
  1034. X/* ---- KEYWORDS ----  */
  1035. X
  1036. X/* prefix for keywords */
  1037. X#define PREFIX '@'
  1038. X
  1039. X#define NBKEYWORD 10
  1040. X
  1041. X#define START     0
  1042. X#define CLEAR     1
  1043. X#define SHOWBOARD 2
  1044. X#define TOWHITE   3
  1045. X#define TOBLACK   4
  1046. X#define CONFIGWH  5
  1047. X#define CONFIGBL  6
  1048. X#define DEFAULTP  7
  1049. X#define SPECIAL   8
  1050. X#define KNULL     9
  1051. X
  1052. X
  1053. X/* ---- LANGUAGES ---- */
  1054. X
  1055. X#define FRENCH  0
  1056. X#define ENGLISH 1
  1057. X#define ITALIAN 2
  1058. X#define SPANISH 3
  1059. X#define GERMAN  4
  1060. X#define DUTCH   5
  1061. X#define RUSSIAN 6
  1062. X
  1063. X#define NBLANGUAGE 6
  1064. X
  1065. X#ifndef DEFAULT_INPUT_LANGUAGE
  1066. X#define DEFAULT_INPUT_LANGUAGE  FRENCH
  1067. X#endif
  1068. X
  1069. X#ifndef DEFAULT_OUTPUT_LANGUAGE
  1070. X#define DEFAULT_OUTPUT_LANGUAGE FRENCH
  1071. X#endif
  1072. X
  1073. X/* ---- MISC TABLES ---- */
  1074. X
  1075. X/* roque ascii table */
  1076. X#define NBROQUE     6
  1077. X#define SPETITROQUE 0
  1078. X#define SGRANDROQUE 1
  1079. X
  1080. X
  1081. X/* ---- DRIVERS ---- */
  1082. X
  1083. X/* output drivers name table */
  1084. X#define DEFAULT_DRIVER D_ASCII
  1085. X
  1086. X/* ---- IO ---- */
  1087. X
  1088. X#ifndef LIB_DIR
  1089. X#define LIB_DIR    "./lib/"
  1090. X#endif
  1091. X
  1092. X#define HELP_FILE  "HELPFILE"
  1093. X
  1094. Xextern FILE * infile;
  1095. X
  1096. X/* ------------- service routines -------------------*/
  1097. X
  1098. X/* Output an error message and exit */
  1099. X#define fatal(A) (void) fprintf A , close_files() , exit(1)
  1100. X
  1101. X/* Output an error message and set the error flag */
  1102. X#define error(A) (void) fprintf A , error_flag = TRUE , (void)fflush(stderr)
  1103. X
  1104. X/* Output an error message and set the error flag */
  1105. X#define message(A) (void) fprintf A 
  1106. X
  1107. X#define MALLOC(T)  (T *)malloc((unsigned)sizeof(T))
  1108. X#define ALLOCP(P)  if ( (P) == NULL ) { fatal(("malloc failed")) ; };
  1109. X
  1110. X/* ------- conversion of input character --------------------- */
  1111. X
  1112. X#define lettertocol(c)  ((c)-'a'+1)
  1113. X#define lettertolig(c)  ((c)-'1'+1)
  1114. X#define coltoletter(n)  ((n)-1+'a')
  1115. X#define ligtoletter(n)  ((n)-1+'1')
  1116. X
  1117. X
  1118. X/* ------- variables and functions --------------------------- */
  1119. Xextern char *version_string;
  1120. Xextern int configuring;
  1121. Xextern int configside;
  1122. Xextern char *in_table;
  1123. Xextern char *out_table;
  1124. Xextern char *c_roque[];
  1125. Xextern char *c_en_passant[];
  1126. Xextern char c_prise;
  1127. Xextern char *c_comments[];
  1128. Xextern int error_flag;
  1129. X
  1130. X/* ---------- service routines ---------- */
  1131. X
  1132. Xextern void clear_board(/*game *g*/);
  1133. Xextern game *new_board(/*void*/);
  1134. Xextern void init_board(/*game *tgm*/);
  1135. Xextern depl *new_move(/*void*/);
  1136. Xextern void init_move(/*depl *m*/);
  1137. X
  1138. X
  1139. X/* ------ parse and analysis routines ------ */
  1140. X
  1141. Xextern int in_board(/*int l, int c*/);
  1142. Xextern int path_free(/*int l1, int c1, int l2, int c2*/);
  1143. Xextern int check_roque(/*void*/);
  1144. Xextern int guess_piece(/*void*/);
  1145. Xextern int guess_depl(/*int nb, int tab[][2], int *pl1, int *pc1, int l2, int c2, int path*/);
  1146. Xextern int ambiguity(/*int frompiece, int l2, int c2*/);
  1147. Xextern int check_move(/*depl *m*/);
  1148. Xextern int guess_move(/*void*/);
  1149. Xextern int clear_pos(/*int lig, int col*/);
  1150. Xextern int configure(/*void*/);
  1151. Xextern int execute_move(/*void*/);
  1152. Xextern int typechar(/*char c*/);
  1153. Xextern int execute(/*int num, char c*/);
  1154. Xextern int parse_number(/*char *token*/);
  1155. Xextern int parse_keyword(/*char *token*/);
  1156. Xextern int parse_roque(/*char *token*/);
  1157. Xextern int parse_move(/*char *token*/);
  1158. Xextern void init_parse(/*depl *m*/);
  1159. X
  1160. X
  1161. X/* ------ top-level interface functions -------- */
  1162. X
  1163. Xextern int parse_options(/*int argc, char *argv[]*/);
  1164. Xextern void close_files(/*void*/);
  1165. Xextern int associe_traduction(/*char **table, int langage*/);
  1166. Xextern int main(/*int argc, char *argv[]*/);
  1167. X
  1168. X
  1169. X#endif
  1170. END_OF_FILE
  1171. if test 3383 -ne `wc -c <'notation.h'`; then
  1172.     echo shar: \"'notation.h'\" unpacked with wrong size!
  1173. fi
  1174. # end of 'notation.h'
  1175. fi
  1176. if test -f 'notation.n' -a "${1}" != "-c" ; then 
  1177.   echo shar: Will not clobber existing file \"'notation.n'\"
  1178. else
  1179. echo shar: Extracting \"'notation.n'\" \(9431 characters\)
  1180. sed "s/^X//" >'notation.n' <<'END_OF_FILE'
  1181. X.\" @(#)notation.n    2.1    4/11/91;
  1182. X.TH notation n "10 December 1990"
  1183. X
  1184. X.SH NAME
  1185. X
  1186. Xnotation \- transform chess notation
  1187. X
  1188. X.SH SYNOPSYS
  1189. X
  1190. Xnotation [input file] [-o output file] [options...]
  1191. X
  1192. X.SH DESCRIPTION 
  1193. X
  1194. XThis program reads chess games, either full algebraic or shortened (ie
  1195. XNf1-g3 or Ng3) and is able to ouptut the board after any move, in
  1196. Xeither ascii , postscript, nroff, latex or xchess save
  1197. Xformat. This program is also multi-lingual: it handles english,
  1198. Xfrench, spanish, german, italian and dutch symbols.
  1199. X
  1200. X.SH OPTIONS
  1201. XCommand line options:
  1202. X.TP 8
  1203. X.B    -a        
  1204. Xalgebraic move notation output
  1205. X.TP 8
  1206. X.B    -s        
  1207. Xshortened move notation output
  1208. X.TP 8
  1209. X.B      -f <language>    
  1210. Xspecifies the chess symbol input language. The language  can be any of
  1211. X\fBfrench\fR, \fBenglish\fR, \fBitalian\fR, \fBspanish\fR,
  1212. X\fBgerman\fR, \fBdutch\fR.
  1213. X.TP 8
  1214. X.B    -t <language>    
  1215. Xspecifies the chess symbol output language. Same options as input language.
  1216. X.TP 8
  1217. X.B <inputfile>
  1218. Xspecifies the input file. If none, keyboard is assumed.
  1219. X.TP 8
  1220. X.B    -o <outputfile>
  1221. Xspecifies the output file. If none, screen is assumed.
  1222. X.TP 8
  1223. X.B -c <number>[,<number]    
  1224. Xspecifies the \fBnumber\fR of the moves at which  to display the board. If
  1225. Xnone, board 
  1226. Xis displayed at end of file. Several numbers may be specified, as a
  1227. Xcomma-separated list.
  1228. X.TP 8
  1229. X.B -e <number>     
  1230. Xdisplay the board at the move \fBnumber\fR and then stops
  1231. X.TP 8
  1232. X.B    -b        
  1233. Xdisplay only the board, not the moves
  1234. X.TP 8
  1235. X.B    -d <drivername>    
  1236. Xspecifies the output driver. It can be any of the following:
  1237. X\fBascii\fR, \fBpostscript\fR, \fBtex\fR, \fBroff\fR, \fBxchess\fR
  1238. X(xchess or xboard save format), \fBgnu\fR (gnuan input format).
  1239. X.TP 8
  1240. X.B    -h        
  1241. Xdisplays help screen
  1242. X
  1243. X.SH "INPUT LANGUAGE"
  1244. X    
  1245. XThe input language has four types of input: moves, move numbers,
  1246. Xcomments and keywords. All these are separated by blanks, TAB or RC.
  1247. XCommas are not accepted.
  1248. X
  1249. X.TP 8
  1250. X.B move format:
  1251. XThe moves are accepted in algebraic or shortened algebraic
  1252. Xnotation. That means that the following are equivalent and accepted \fB
  1253. XNf1-g3 N-f1xg3, Nxg3, Ng3\fR. The ugly english notation \fBP-K4\fR is
  1254. Xnot understood, neither by the program nor me. 
  1255. X
  1256. XNota: provided you remove the three first line, xchess save format is
  1257. Xaccepted.  Also you can have trailing comments to move, provided there
  1258. Xis no blanks. So \fBKg4!!, Ra5++\fR are correct, but not \fBKg4 !!,
  1259. XRa5 ++\fR because of the separating blank. A future version might
  1260. Xhandle these move comments, as well as \fB + ++, mate, white
  1261. Xresigns\fR etc... Castling is recognized with the following \fB0-0
  1262. XO-O o-o 0-0-0 O-O-O o-o-o\fR. "En passant" and promotion are now
  1263. Xcorrectly handled. For "en passant", you just indicate them move and
  1264. Xit is correctly parsed ex: "d5-d7 e5xd6". Promotion is indicated with
  1265. Xthe "=" sign followed by the new piece name. So you just write
  1266. X"a7-a8=Q" or "d8=K".
  1267. X
  1268. XFor example, see the files \fBalgebraic.txt\fR and
  1269. X\fBshortened.txt\fR
  1270. X
  1271. X.TP 8
  1272. X.B move numbers:
  1273. Xmove numbers are in the form \fB23.\fR or \fB36\fR. The full
  1274. Xpoint is optional. Move numbers are checked against internal move
  1275. Xcounter. 
  1276. X
  1277. X.TP 8
  1278. X.B comments: 
  1279. Xanything else, except keywords, must be enclosed in brackets
  1280. Xor parenthesis \fB[Here Karpov made a very bright move ...]\fR
  1281. X\fB(this is also a comment)\fR. Comments are skipped out.  A future
  1282. Xversion might incorporte them in the output.
  1283. X
  1284. X.TP 8
  1285. X.B keywords:
  1286. Xyou can insert keywords in the input text to precisely define
  1287. Xwhat you want: displaying the board, configuring it... Keywords are
  1288. Xdetailled in the next section.
  1289. X
  1290. X.SH KEYWORDS
  1291. XAll keywords are prefixed with \fB@\fR
  1292. X.TP8
  1293. X.B @startplay
  1294. Xbegins the play. Obligatory after a \fB@configxxx\fR keyword.
  1295. X.TP8
  1296. X.B @clearboard
  1297. Xclears the board. Used prior to any \fB@configxxx\fR.
  1298. X.TP8
  1299. X.B @showboard
  1300. Xdisplays the board. Can be used anywhere
  1301. X.TP8
  1302. X.B @whitesmove
  1303. Xtells the program that is the white's turn of play. Useful after a
  1304. X\fB@configxxx\fR and \fB@startplay\fR
  1305. X.TP8
  1306. X.B @blacksmove
  1307. Xtells the program that it is black's turn
  1308. X.TP8
  1309. X.B @configwhite
  1310. Xinitializes configuration of white side. Pieces are then expected, in
  1311. Xform of (optional for Pawn) name, the position. Example
  1312. X\fB@configwhite Ke3 Rg8 e4\fR.
  1313. X.TP8
  1314. X.B @configblack
  1315. Xinitializes configuration of black side. Pieces are then expected, in
  1316. Xform of (optional for Pawn) name, the position. Example:
  1317. X\fB@configblack Ka8 Nf6 e6\fR. 
  1318. X
  1319. XNote that black pieces are given in uppercase!
  1320. X.TP8
  1321. X.B @default
  1322. Xresets the board to the default start configuration.
  1323. X.TP8
  1324. X.B @special
  1325. Xall following text up to the next cariage return is not processed, but
  1326. Xinstead directly print. This allows to insert comments in ascii files,
  1327. Xor tex commands when tex output is selected. 
  1328. X.TP8
  1329. X.B @null
  1330. XNull keyword. Does nothing. Used for convenience in programming.
  1331. X
  1332. X
  1333. XSee the file \fBkeywords.txt\fR for an example of keywords use.
  1334. X
  1335. X.SH "NATIONAL LANGUAGES"
  1336. X
  1337. XHere are the symbols used in the differents languages. () mean
  1338. Xoptional in the input.
  1339. X
  1340. X
  1341. Xenglish-name    King    Queen    Rook    Bishop    Knight    Pawn
  1342. Xenglish        K    Q    R    B    N    (P)
  1343. Xfrench        R    D    T    F    C    (P)
  1344. Xitalian        R    D    T    A    C    (P)
  1345. Xspanish        R    D    T    A    C    (P)
  1346. Xgerman        K    D    T    L    S    (B)
  1347. Xdutch        K    D    T    L    P    (O)
  1348. X
  1349. X
  1350. X.SH DRIVERS
  1351. X.TP 8
  1352. X.B ascii
  1353. Xthis is the default driver, it outputs move and boards.
  1354. X.TP 8
  1355. X.B postscript
  1356. Xit generates a file using the font file \fBCheq\fR licensed for free
  1357. Xby Adobe. It is only able to display one board per run. Move are not
  1358. Xdisplayed. You need the font "Cheq", freely distributed by Adobe.
  1359. XSend a mail to "ps-file-server@adobe.com" with the body "send Programs
  1360. Xchessfont.ps". For use with "notation", rename the file "Cheq".
  1361. X.TP 8
  1362. X.B tex 
  1363. Xthis is a \fBlatex\fR driver. It uses the TeX/LaTeX chess macros
  1364. Xdesigned by Piet Tutalaers "rcpt@urc.tue.nl". The complete
  1365. Xdistribution is available on sol.cs.ruu.nl (131.211.80.5) with path
  1366. XTEX/chess.tar.Z \fBchesscls\fR, provided in the library. Refer to your
  1367. Xlocal latex guru to install it.
  1368. X.TP 8
  1369. X.B roff
  1370. Xthis is a driver for nroff output. It is crude, but it works. Moves and
  1371. Xboards are displayed.
  1372. X.TP 8
  1373. X.B xchess
  1374. XThis driver generates compatible xchess/xboard save files, thus allowing you
  1375. Xto replay a game with xchess.
  1376. X.TP 8
  1377. X.B gnu
  1378. XThis driver completely "bare" file, with only the algebraic move. It
  1379. Xis suitable for any low-level analyser, such as gnuan.
  1380. X
  1381. X.SH EXAMPLES
  1382. X    Try the following commands:
  1383. X.TP 8
  1384. X.B notation algebraic.txt
  1385. Xthis will read the Karpov-Kasparov game 13 (Lyon 1990) in algebraic form,
  1386. Xdisplay move in algebraic and display board at end of game.
  1387. X.TP 8
  1388. X.B notation algebraic.txt -a
  1389. Xthis will do the same thing, as \fB-a\fR stands for algebraic
  1390. Xoutput. 
  1391. X.TP 8
  1392. X.B notation algebraic.txt -s
  1393. Xthe game will now be output in shortened algebraic
  1394. X.TP 8
  1395. X.B notation shortened.txt
  1396. Xthere is no problem to read shortened algebraic.
  1397. X.TP 8
  1398. X.B notation shortened -s -o result
  1399. Xthe moves and board will be directed to file \fBresult\fR
  1400. X.TP 8
  1401. X.B notation shortened.txt -s -t french 
  1402. Xoutput will use french notation
  1403. X.TP 8
  1404. X.B notation a_dutch_file -f dutch -t spanish
  1405. Xgame will be translated form dutch to spanish
  1406. X.TP 8
  1407. X.B notation shortened -c 2
  1408. Xboard after move 2 will be displayed, along with moves and end-of-game
  1409. Xboard
  1410. X.TP 8
  1411. X.B notation shortened -e 2
  1412. Xboard after move 2 will be displayed, along with moves. The program
  1413. Xwill then stops
  1414. X.TP 8
  1415. X.B notation shortened -c 2,5,20
  1416. Xboard after moves 2, 5 and 20 will be displayed, along with moves and
  1417. Xend-of-game board
  1418. X.TP 8
  1419. X.B notation shortened -c 2,5,20 -b
  1420. Xboard after moves 2, 5 and 20 will be displayed, with end-of-game
  1421. Xboard, but no moves.
  1422. X.TP 8
  1423. X.B notation shortened -c 2,5,20 -d tex -o out.tex
  1424. Xthe output will be formatted to use with latex. You can directly latex
  1425. Xthe output file.
  1426. X.TP 8
  1427. X.B notation shortened -c 2,5,20 -d gnu -o out.gnu
  1428. Xyou can now replay the game by using \fBxchess -r out.gnu\fB.
  1429. X.TP 8
  1430. X.B notation shortened -e 5 -d postscript -o out.ps
  1431. XNow issue \fBcat lib/Cheq out.ps | lpr\fR to display on a Laser
  1432. XPrinter the board at move 5. You can also issue \fBsh print-ps
  1433. Xout-ps\fR.
  1434. XThe postcript driver does not support the \fB-c\fR option.
  1435. X
  1436. X.SH FILES
  1437. X
  1438. X.TP 8
  1439. X.B algebraic.txt shortened.txt keywords.txt
  1440. Xthese are examples of input files
  1441. X
  1442. X.TP 8
  1443. X.B ./lib/HELPFILE
  1444. Xthis is the on-line helpfile
  1445. X
  1446. X.TP 8
  1447. X.B ./lib/(Cheq Header.ps Footer.ps)
  1448. Xthese files are needed by the postscript driver
  1449. X
  1450. X.TP 8
  1451. X.B ./lib/Header.tex
  1452. Xthese file is needed by the (la)tex driver
  1453. X
  1454. X.TP 8
  1455. X.B ./lib/chesscls.mf
  1456. Xthis file is used the generate the tex font
  1457. X
  1458. X.SH "SEE ALSO"
  1459. Xxchess(1), chess(6), gnuchess(1), latex(1), nroff(1), lpr(1)
  1460. X
  1461. X.SH DIAGNOSTICS
  1462. XErrors messages are hoped to be self-explanative.
  1463. X
  1464. X.SH COMMENTS 
  1465. XThe program is quite large, due to the large use of tables and
  1466. Xvariables to control its features. The advantage is you only need the
  1467. Xmodify these tables to customize it: for instance adding a new
  1468. Xlanguage or tuning the output format to your own needs. 
  1469. X
  1470. X.SH BUGS
  1471. XToo many. Report them to \fBHenry.Thomas@irisa.fr\fr.
  1472. X
  1473. XThe postscript driver *might* fais if you try to display the board
  1474. Xtwo times. Anyway, it is not designed to do this. Use \fB-e\fR option
  1475. Xto specify the move at which you want to display board.
  1476. X
  1477. X.SH AUTHOR
  1478. XHenry Thomas IRISA-Rennes, FRANCE. E-mail to
  1479. X\fBHenry.Thomas@irisa.fr\fR or \fBhthomas@irisa.fr\fR.
  1480. X.SH "THANKS"
  1481. X
  1482. XThanks to Jacques Schuurman for the piece description in Dutch, Dr. Z.
  1483. XRubinstein, University of Haifa for the Metafont files, Philippe
  1484. XLouarn for implementing these macros and explaining me how to use
  1485. Xthem, Adobe Systems for the font Cheq, and Jean-Luc Scharbarg for
  1486. Xintroducing me in the world of chess.
  1487. END_OF_FILE
  1488. if test 9431 -ne `wc -c <'notation.n'`; then
  1489.     echo shar: \"'notation.n'\" unpacked with wrong size!
  1490. fi
  1491. # end of 'notation.n'
  1492. fi
  1493. if test -f 'print-ps' -a "${1}" != "-c" ; then 
  1494.   echo shar: Will not clobber existing file \"'print-ps'\"
  1495. else
  1496. echo shar: Extracting \"'print-ps'\" \(134 characters\)
  1497. sed "s/^X//" >'print-ps' <<'END_OF_FILE'
  1498. X#!/bin/sh
  1499. X# printer for ps files using the font chess
  1500. X# args : files to print
  1501. XCHEQFILE="./Cheq"
  1502. Xfor i
  1503. Xdo
  1504. X    cat $CHEQFILE $i | lpr
  1505. Xdone
  1506. END_OF_FILE
  1507. if test 134 -ne `wc -c <'print-ps'`; then
  1508.     echo shar: \"'print-ps'\" unpacked with wrong size!
  1509. fi
  1510. chmod +x 'print-ps'
  1511. # end of 'print-ps'
  1512. fi
  1513. if test -f 'shortened.txt' -a "${1}" != "-c" ; then 
  1514.   echo shar: Will not clobber existing file \"'shortened.txt'\"
  1515. else
  1516. echo shar: Extracting \"'shortened.txt'\" \(7012 characters\)
  1517. sed "s/^X//" >'shortened.txt' <<'END_OF_FILE'
  1518. X[This is the commentary from the USA Today Sports Center, written by
  1519. XIM Bjarke Kristiansen (and polished a bit by me).][ They are probably
  1520. Xthe quickest way to get the moves (perhaps AP access is quicker, I
  1521. Xdon't know how fast the AP gets updated on Compuserve); their number
  1522. Xfor subscribing (no online newuser service) is 800-826-9688.]
  1523. X
  1524. X[I was told it was okay to post this from there, as long as I gave
  1525. Xappropriate reference.]
  1526. X
  1527. X[WORLD CHESS CHAMPIONSHIP
  1528. XGAME 13 - Drawn after Adjournment
  1529. XNovember 24, 1990]
  1530. X
  1531. X[KARPOV  KASPAROV]
  1532. X
  1533. X1. d4    Nf6
  1534. X2. c4    g6
  1535. X3. Nc3   d5
  1536. X
  1537. X[Welcome to game 13th ..and the GI that's Grunfeld-Indian. Fight
  1538. Xfrom the start.]
  1539. X
  1540. X4. cxd5  Nd5
  1541. X5. e4    Nxc3
  1542. X6. bxc3  Bg7
  1543. X7. Be3   c5
  1544. X8. Qd2   O-O
  1545. X
  1546. X[So far on two minutes each. GK.. Garry Kasparov looks tensed, says
  1547. XMike Valvo. Now Karpov took full 9 minutes to play ...]
  1548. X
  1549. X9. Rc1   Qa5
  1550. X
  1551. X[Kasparov thought six minutes here. Time now: White 0:19 Black: 0:08.
  1552. XNow 9 minutes has gone and AK is still thinks. Kasparov has left
  1553. Xthe stage. Who is fooling who? 9..Qa5 might be a new move. Its
  1554. Xnot in the pressroom database. Karpov is still thinking, so time for a
  1555. Xlittle presentation. At your service in Lyon IM Bjarke Kristensen (Now Valvo:
  1556. XAK is nodding his head up and down alone on stage.) As kommentators:
  1557. XBoris Spassky and a number of strong french IM's. IM Mike Valvo from New Jersey
  1558. Xis here for a week.]
  1559. X
  1560. X10. Nf3   e6
  1561. X
  1562. X[And the 'soon-to-be' GM Will Watson from England is here too.
  1563. X'I don't understand the GI' he just said. Kasparov stays on stage.
  1564. XTime: White: 0:37 Black: 0:10. Says Will Watson (now WW): 'I
  1565. Xpredicted the opening this morning. And so did many others.'
  1566. XValvo: 'I think this shows that the Kings Indian hasn't worked
  1567. Xout for Kasparov'. IM Levy suggests b7-b6 for Black. IM Jonathan Tisdall says:
  1568. XI've seen this before. But nobody can find a game with it'.]
  1569. X
  1570. X11. d5    exd5
  1571. X12. exd5  Re8
  1572. X13. Be2
  1573. X
  1574. X[Time: White: 0:53 Black: 0:24. Valvo observed GK tapping his
  1575. Xfingers impatiently on the table after move Re8. It just might all
  1576. Xbe preparations! Both are sitting deeply concentrated at the table.]
  1577. X
  1578. X13. ...   Bf5
  1579. X14. O-O
  1580. X
  1581. X[The atmosphere in the pressroom is a bit 'fuzzy'. The game hasn't
  1582. Xfound it's own personality yet, and the fact that the US plays
  1583. Xthe Soviets at the Chess Olympiad in Novi Sad at this very moment is
  1584. Xalso widely discussed.]
  1585. X
  1586. X14. ...   Nd7
  1587. X
  1588. X[Interesting is now: 15.Nh4 Be4 16.f3 Bxd5! 17.Qxd5 Rxe3 18.Qxd7
  1589. X18...Rxe2 with a big Black plus. say Watson. Rumours say that
  1590. XGK might be better here, but nobody really dares to risk his
  1591. Xneck. The game is still in its childhood. But AK surely is in for
  1592. Xa deep think. Now he's on 1:16 and still thinking. Garry has left the
  1593. Xstage. Valvo say: The Mephisto computer thinks Black is better!
  1594. XIt's no 'Deep Thought', but the Mephisto Chess Computer IS
  1595. Xalready world champion in its class. No one else dared to test
  1596. Xtheir program against it!]
  1597. X
  1598. X15. h3
  1599. X
  1600. X[Time: White: 1:18 Black: 0:31. Now Karpov has left stage. And GK
  1601. Xhangs over the board as if to power up his chessmuscles. Kasparov seems
  1602. Xrelaxed and satisfied. White's problem is his weakened pawns on the Q-side.
  1603. XAnd as for his pride-pawn on d5? In an endgame it could be pure
  1604. Xgold, but until then it gives a good square to a Black piece
  1605. Xon d6. Kasparov now 'hangs' his head between his hands. A very typical
  1606. Xposture for the WC.]
  1607. X
  1608. X15. ...   Nb6
  1609. X
  1610. X[GM Lein thinks White is in deep trouble. GK might play Nb6-a4.
  1611. XAnother of GK's ideas might be Qa5-a4.]
  1612. X
  1613. X16. g4
  1614. X
  1615. X[Now ...that's a man! Karpov's idea obviously is 16... Be4 17.c4 Qxd2
  1616. X18.Nxd2 with 19.Nxe4 and 20.Bd3 to come. After a very slow start suddenly
  1617. Xthe game is very exciting. Now the Russians GMs in the pressroom find:
  1618. X16...Be4 17.c4.. Qa3! with a Black edge. But...]
  1619. X
  1620. X16. ...   Bd7
  1621. X
  1622. X[Time: AK: 1:31  GK: 0:49. GM-elects Watson and Gallagher say Karpov is still
  1623. Xunder pressure, but improving. Mephisto 'thinks' it's slightly better for
  1624. XBlack. And the Russians say that Kasparov should have played h7-h5, not
  1625. XNd7-b6.]
  1626. X
  1627. X17. c4    Qxd2
  1628. X18. Nxd2  Na4
  1629. X19. Bf3   Nc3
  1630. X20. Rxc3  Bxc3
  1631. X21. Ne4
  1632. X
  1633. X[The heat is on, in the Palais des Congress. Watson thinks GK is still
  1634. Xdoing well. Might be a British understatement. Kasparov is in for at deep
  1635. Xthink. Time: White: 1:42 Black: 1:12 IM Tisdall: He'll take on e4 now,
  1636. Xand it is a draw.]
  1637. X
  1638. X21. ...   Rxe4
  1639. X22. Bxe4  Re8
  1640. X23. Bd3   b6
  1641. X24. Kg2
  1642. X
  1643. X[Tisdall says: The first one who can bring himself to offer a draw
  1644. Xwill get it. He might be right. A drastic change of the game has
  1645. Xtaken place. And where did Kasparov drop his advantage? Maybe ...Nc3
  1646. Xshould have been prepared. Time: White: 1:46 Black: 1:17.
  1647. XIf Karpov plays Be3-c1 to press f2-f4 (hoping for an endgame
  1648. Xadvantage with f4-f5) GK might play Re8-e1 to enter a tame
  1649. Xdobble-bishop ending. Draw.]
  1650. X
  1651. X24. ...   f5
  1652. X25. gxf5  Bxf5
  1653. X26. Bxf5  gxf5
  1654. X
  1655. X[Karpov sits thinking alone at the board. Black's Bc3 is potentially weaker
  1656. Xthan Be3, but White's c4 pawn is GK's major target. I think that Black's
  1657. Xstill better. White's d-pawn looks strong (and it is) but right now it's
  1658. Xquite impotent. If advanced it'll just be lost, since Kg8 is to close.]
  1659. X
  1660. X27. Rd1   Kf7
  1661. X
  1662. X[Time: White: 2:07 Black: 1:28. Now Kasparov's lead on the clock
  1663. Xbegins to count. Karpov must be considering lines like: 28.d6 Ke6 29.Bf4
  1664. XBe5 30.Bxe5 Kxe5 31.Rd5+ Ke6 32.d7 Rd8 and Black is much better.]
  1665. X
  1666. X28. Rd3   Bf6
  1667. X29. Ra3   a5
  1668. X30. Rb3
  1669. X
  1670. X[Time: White: 2:12 Black: 1:31. It might look simple, but in fact
  1671. Xthe game is balanced on an edge. Which is most important: Black's
  1672. Xweakness on b6 or White's on c4?]
  1673. X
  1674. X30. ...   Bd8
  1675. X
  1676. X[People in the pressroom seems to be losing interest a bit. I think
  1677. Xthat a long endgame battle may be ahead. The fight for the
  1678. Xinitiative is still very much on. Now Watson arrived with news,..
  1679. Xhe said: The Russians think GK is slightly better, the Americans
  1680. Xthinks AK is slightly better and it might be a draw' says Watson.]
  1681. X
  1682. X31. Rc3
  1683. X
  1684. X[Both are leaning across the board. If Karpov can get his king to d3,
  1685. Xhe might play on forever. Kasparov seems 'speculative' now.
  1686. XOne point in Karpov's favour is: 31...Bc7 32.Kf3 Re4 33.Ke2 f4
  1687. X34.Kd3 and Re4 has to move.]
  1688. X
  1689. X31. ...   Bc7
  1690. X
  1691. X[Karpov is hiding his head behind his hands, looking through his
  1692. Xfingers. Nine minutes left.]
  1693. X
  1694. X32. a4    Kf6
  1695. X33. Kf1   f4
  1696. X
  1697. X[33...f4! GK played this with determination. I don't understand
  1698. XKarpov's Kg2-f1.]
  1699. X
  1700. X34. Bc1   Kf5
  1701. X35. Rc2   Rg8
  1702. X36. Re2   Be5
  1703. X37. Bb2   Bd4
  1704. X38. Bxd4  cxd4
  1705. X39. Re7   d3
  1706. X40. Ke1   Rc8
  1707. X41. Kd2   Rxc4
  1708. X
  1709. X[Kasparov has moved from c8 to c4. Move 41 made. The last seven
  1710. Xmoves took only 11 minutes Now all analysis goes: 42.Kxd3
  1711. XRxa4 43.d6 Ra3+ 44.Kc4 Ra1 45. Kd5 Rd1+ 46.Kc6 a4 and White
  1712. Xmight be the one who in trouble. Both still sits at the board. GK
  1713. Xis looking everywhere else, waiting for Karpov to decide on
  1714. Xif he want to sealed his move  now. Some say that Kasparov might
  1715. Xhave proposed a draw earlier on. Not verified. Time: 2:42 - 2:08.
  1716. XKarpov sealed his 42nd move. The game will be continued (maybe)
  1717. Xtomorrow at 11:00 AM ET.
  1718. X
  1719. X
  1720. XGame 13 Adjournment Update
  1721. XA draw was agreed upon before adjournement has resumed.]
  1722. X
  1723. X
  1724. END_OF_FILE
  1725. if test 7012 -ne `wc -c <'shortened.txt'`; then
  1726.     echo shar: \"'shortened.txt'\" unpacked with wrong size!
  1727. fi
  1728. # end of 'shortened.txt'
  1729. fi
  1730. echo shar: End of archive 1 \(of 3\).
  1731. cp /dev/null ark1isdone
  1732. MISSING=""
  1733. for I in 1 2 3 ; do
  1734.     if test ! -f ark${I}isdone ; then
  1735.     MISSING="${MISSING} ${I}"
  1736.     fi
  1737. done
  1738. if test "${MISSING}" = "" ; then
  1739.     echo You have unpacked all 3 archives.
  1740.     rm -f ark[1-9]isdone
  1741. else
  1742.     echo You still need to unpack the following archives:
  1743.     echo "        " ${MISSING}
  1744. fi
  1745. ##  End of shell archive.
  1746. exit 0
  1747.  
  1748. --
  1749. Henry Thomas - IRISA          - E-mail: Henry.Thomas@irisa.fr 
  1750. Campus Universitaire de Beaulieu - Phone: (+33)99 36 20 00 +549  
  1751. 35042 RENNES CEDEX FRANCE      - Fax: (+33)99 38 38 32 Telex: UNIRISA 950473F
  1752. Telex Atlas X400: /X121=842950473/@atlas.fr, Fax:/X121=200099383832/@atlas.fr
  1753. --
  1754. ... Words, and the words of men, flicker and flutter and beat
  1755. Warning, sorrow and gain, salutations and mirth...        R. Kipling
  1756.  
  1757. exit 0 # Just in case...
  1758. -- 
  1759. Kent Landfield                   INTERNET: kent@sparky.IMD.Sterling.COM
  1760. Sterling Software, IMD           UUCP:     uunet!sparky!kent
  1761. Phone:    (402) 291-8300         FAX:      (402) 291-4362
  1762. Please send comp.sources.misc-related mail to kent@uunet.uu.net.
  1763.